package com.xiaoshuidi.cloud.module.member.mapper.topics;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.member.controller.admin.topics.vo.MemberTopicsPostListVo;
import com.xiaoshuidi.cloud.module.member.controller.admin.topics.vo.TopicPointVO;
import com.xiaoshuidi.cloud.module.member.controller.admin.topics.vo.TopicsPostDetailVO;
import com.xiaoshuidi.cloud.module.member.controller.admin.topics.vo.TopicsPostPageVO;
import com.xiaoshuidi.cloud.module.member.controller.app.topics.vo.AppTopicsPostPageVO;
import com.xiaoshuidi.cloud.module.member.pojo.topics.MemberTopicsPost;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface MemberTopicsPostMapper extends BaseMapperX<MemberTopicsPost> {
    IPage<MemberTopicsPostListVo> getPage(Page<MemberTopicsPost> memberTopicsPostPage, @Param("vo") TopicsPostPageVO pageVO);

    IPage<TopicsPostDetailVO> getAppPage(Page<MemberTopicsPost> memberTopicsPostPage, @Param("vo") AppTopicsPostPageVO pageVO);

    void addLike(@Param("id") Long id);

    TopicPointVO getTopicPoints(@Param("id") Long id);

    List<MemberTopicsPostListVo> exportTopicsPostList(@Param("vo") TopicsPostPageVO form);

    void updateUserId(@Param("oldUserId")Long oldUserId,@Param("userId") Long userId);
}
